#######################################################################
TSU Report: Threshold Analysis in NICE Guideline Development
	David M. Phillippo, Sofia Dias, Nicky J. Welton, A. E. Ades
	NICE CGTSU
	University of Bristol
#######################################################################

This appendix contains:
	1.	R functions to perform threshold analyses and present the 
		results.
	2.	Example R and WinBUGS code, used for the analyses presented in
		the report.
		
The R functions (in subfolder "Functions") are general purpose, and may 
be used to easily perform threshold analysis in a wide variety of 
situations. Please see the report, appendix A.2, for details of these 
functions and their uses. 

Example code (in subfolder "Examples") may be used to recreate the 
analyses presented in sections 2-4 of the report. Prior to running the
R code, the posterior distribution must be generated by WinBUGS: 
	1.	Fit the model contained in the WinBUGS code file, monitoring
		the necessary parameters.
	2.	Save the resulting CODA in the "WinBUGS" subfolder as
			"Coda1.txt"
			"Coda2.txt"
			...
			"CodaIndex.txt"
	3.	The R code in the file "* - read CODA.R" will read in the 
		posterior and generate the required statistics. This code is 
		called automatically called by the threshold code files, and
		will save the posterior	results for quicker repeat calculation.
